<?php
class Rtfmodel extends Model{
	function __construct()
	{
		parent :: Model();
	}
	function setRtf($enable,$textarea=array())
	{
		if($enable == 'true')
		{
			$url = base_url()."assets/rte/";
			
		$links['0'] = "<script type=\"text/javascript\" src=\"".$url."richtext_compressed.js\"></script>\n";
        $links['1']="<script type=\"text/javascript\">\n";
        //Usage: initRTE(imagesPath, includesPath, cssFile)
        $links['1'] .="initRTE(\"".$url."/images/\", \"$url\",\"\");";
        //-->
        $links['1'] .="</script>";
		$links['2']="<script type=\"text/javascript\">\n";
		//Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
       $links['2'] .="writeRichText('description', 'here&#39;s the \"<em>preloaded</em> <b>content</b>\"', 400, 200, true, false);";
       $links['2'] .= "</script>\n";
          
		
		return $links;
		}
//	 else{
//	 	echo "hello";
//			
//	   }
	
  }
}

?>